﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InterestCalculationBiz
{
  public class LoanProperties
    {
      private string _loanDate = "";
      private string _fRepaymentDate = "";
      private string _newRepaymentDate = "";
      private string _startDate = "";
      private string _nextRepaymentDue,_loantype = "";
      private double _otherCharges,_brokerageFee,_creditSearchFee, _estabalishmentFee, _monthlyfee
          ,_securityfee,_newterm,_newInterestRate = 0,_Repayment=0;
      private Boolean _isupdate=false;
      private int _nextFrequency = 0;
      private double[] _singlepayment = { 0 };
      private int[] _applypayhash = { 0 }; 
        public Int64 App_Id
        {
            get;
            set;
        }
        public int Frequency
        {
            get;
            set;
        }
        public Double Principal
        {
            get;
            set;
        }
        public double LoanDuration
        {
            get;
            set;
        }
        public Double InterestRate
        {
            get;
            set;
        }
        public string FirstRepaymentDate
        {
            get{return _fRepaymentDate;}
            set{_fRepaymentDate=LoanMethod.OutputDateFormat(value);}
        }
        public string LoanDate
        {
            get{return _loanDate;}
            set{_loanDate=LoanMethod.OutputDateFormat(value);}
        }
        public Double OtherCharges
        {
            get { return _otherCharges; }
            set{_otherCharges=value;}
        }
        public Double BrokerageFee
        {
            get{return _brokerageFee;}
            set{_brokerageFee=value;}
        }
        public Double CreditSearchFee
        {
            get{return _creditSearchFee;}
            set { _creditSearchFee = value; }
        }
        public Double EstabalishmentFee
        {
            get{return _estabalishmentFee;}
            set{_estabalishmentFee=value;}
        }
        public Double MonthlyFee
        {
            get{return _monthlyfee;}
            set {_monthlyfee=value;}
        }
        public Double SecurityFee
        {
            get { return _securityfee; }
            set{_securityfee=value;}
        }
      /// <summary>
      /// Loan Type will be =ChangeRate,ChangeAllPayment,ChangeFrequence,ChangeSinglePayment,MaximumInterestRate
      /// </summary>
        public string LoanType
        {
            get{return _loantype;}
            set{_loantype=value;}
        }
        public Boolean IsUpdate
        {
            get { return _isupdate; }
            set { _isupdate = value; }
        }
        public string NewRepaymentDate
        {
            get { return _newRepaymentDate; }
            set { _newRepaymentDate = LoanMethod.OutputDateFormat(value); }
        }
        public double NewTerm
        {
            get{return _newterm;}
            set { _newterm = value; }
        }
        public double NewInterestRate
        {
            get { return _newInterestRate; }
            set { _newInterestRate = value; }
        }
        public string StartDate
        {
            get { return _startDate; }
            set { _startDate = LoanMethod.OutputDateFormat(value); }
        }
        public double Repayment
        {
            get { return _Repayment; }
            set { _Repayment = value; }
        }
        public string NextRepaymentDue
        {
            get { return _nextRepaymentDue; }
            set { _nextRepaymentDue = LoanMethod.OutputDateFormat(value); }
        }
        public int NextFrequency
        {
            get {return _nextFrequency; }
            set { _nextFrequency=value; }
        }
        public double[] SingleRepayment
        {
            get {return _singlepayment;}
            set{_singlepayment=value;}
        }
        public int[] applypayhash
        {
            get{return _applypayhash;}
            set { _applypayhash = value; }
        }
    }
}
